Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@leafygreen-ui/emotion
Advanced tools
yarn add @leafygreen-ui/emotion
npm install @leafygreen-ui/emotion
Because we use a custom instance of Emotion to allow for styles defined in LeafyGreen to be easily overwritten, there's an additional step that must be taken to use our components when performing server-side rendering.
We expose three methods as named exports that are also exposed by the base emotion-server
package: renderStylesToString
, renderStylesToNodeStream
, and extractCritical
. You can find documentation on usage of each of the methods in the official Emotion documentation.
NOTE: If you are already server-side rendering an application using Emotion, you will use the methods exposed in
@leafygreenui/emotion
instead of, NOT in addition to the methods exposed byemotion-server
.
import { renderToString } from 'react-dom/server';
import { renderStylesToString } from '@leafygreen-ui/emotion';
import App from './App';
const html = renderStylesToString(renderToString(<App />));
FAQs
leafyGreen UI Kit's Custom Instance of Emotion
The npm package @leafygreen-ui/emotion receives a total of 38,318 weekly downloads. As such, @leafygreen-ui/emotion popularity was classified as popular.
We found that @leafygreen-ui/emotion demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.